﻿using Microsoft.Phone.Controls;
using XBMCRemote.DataModel;

namespace XBMCRemote
{
    public partial class RemoteControl : PhoneApplicationPage
    {
        private XbmcHelper _xbmcHelper;
        public RemoteControl()
        {
            InitializeComponent();
            _xbmcHelper = (App.Current as App).XbmcHelper;
        }

        private void btnOk_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            _xbmcHelper.Input.Select();
        }

        private void btnHome_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            _xbmcHelper.Input.Home();
        }

        private void btnUp_Click(object sender, System.Windows.RoutedEventArgs e)
        {
			_xbmcHelper.Input.Up();
        }

        private void btnDown_Click(object sender, System.Windows.RoutedEventArgs e)
        {
        	_xbmcHelper.Input.Down();
        }

        private void btnLeft_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            _xbmcHelper.Input.Left();
        }

        private void btnRight_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            _xbmcHelper.Input.Right();
        }

        private void btnBack_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            _xbmcHelper.Input.Back();
        }
    }
}
